﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;

namespace DigitaleHulpSoftware.Connection
{
    public class MsSQLConnection
    {
        SqlConnection myConnection = new SqlConnection("user id=username;" +
                                          "password = password;" +
                                          " server = serverurl;" +
                                          "Trusted_Connection = yes;" +
                                          "database = database; " +
                                          "connection timeout=30");

        public void SqlConnection.Open()
        {
            try
            {
                myConnection.Open();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
        }

        public void SqlConnection.Close()
        {
            try
            {
                myConnection.Close();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
        }
    }
}